#{extends 'main.html' /} 
#{set title:'Reset password' /} 
#{set hasForm:true /}

#{set 'moreStyles'}
<style>
    .header {
        margin-bottom: 6px;
    }
    .subheader {
        margin-bottom: 26px;
    }
</style>
#{/set}

<div class="row">
<div class="span6 offset3">

#{ifError 'confirmationCode'}
<div class="alert alert-error">
    #{error 'confirmationCode'/}
</div>
#{/ifError}
#{ifError 'unknownUser'}
<div class="alert alert-error">
    #{error 'unknownUser'/}
</div>
#{/ifError}

#{form action: @Security.resetPasswordRequest2(), class: "form-horizontal"}

<fieldset>
    <legend class="header">
        Reset password
    </legend>
    <p class="subheader">
        To reset your password, enter your user name and the email address associated with your account.
    </p>
    <div class="control-group #{errorClassBootstrap 'username'/}">
        <label class="control-label" for="username">Username</label>
        <div class="controls">
            <input type="text" name="username" value="${flash.username}" maxlength="${util.Util.VARCHAR_SIZE}" />
            <span class="help-inline">​#{error 'username'/}</span>
        </div>
    </div>
    <div class="control-group #{errorClassBootstrap 'email'/}">
        <label class="control-label" for="email">Email</label>
        <div class="controls">
            <input type="text" name="email" value="${flash.email}" maxlength="${util.Util.VARCHAR_SIZE}" />
            <span class="help-inline">​#{error 'email'/}</span>
        </div>
    </div>
    <div class="form-actions">
        <input type="submit" class="btn btn-primary" value="Continue" />
        <a class="btn" href="@{Secure.login()}">Back to login</a>
    </div>
</fieldset>

#{/form}

</div>
</div>